package com.company.cloud.club.modules.db.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.company.cloud.club.modules.db.domain.FileInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface FileInfoMapper extends BaseMapper<FileInfo> {

    @Select("SELECT * FROM club_file_info WHERE res_id = #{resId, jdbcType=VARCHAR}")
    List<FileInfo> selectByResId(@Param("resId") String resId);

    @Delete("DELETE FROM club_file_info WHERE res_id = #{resId, jdbcType=VARCHAR}")
    void deleteByResId(@Param("resId") String resId);

}